To configure a project built by Embarcadero's Delphi, the following settings should be applied to achieve the best results.

Win32 and Win64 Projects

Navigate to Options -> Building -> Delphi Compiler -> Compiling and set the option Optimization to false and the option Stack frames to true. This is required to allow WonderLeak accurately capture stack traces.

Navigate to Options -> Packages -> Runtime Packages and set Link with runtime packages to true. This is required so allocations occurring from System::SysAllocMem will be serviced by the dynamically linked runtime library (RTL) (eg. rtl270.bpl). If this setting is not enabled, these allocations will be serviced by a statically linked allocator and WonderLeak will not be able to trace these allocations.

Win32 Projects

Navigate to Options -> Building -> Delphi Compiler -> Linking and set the option Debug information to true and the option Place debug information in separate TDS file to true. This is required to generate the needed TDS symbol file which will allow WonderLeak resolve stack traces into their symbol names and source file and line number information. The TDS format may emit source file paths as relative paths, relative to the project file (.dproj) of the application. To allow WonderLeak locate source files with relative paths, you must add a suitable Source file local search paths entry via the applications Symbol Settings.

Win64 Projects

Navigate to Options -> Building -> Delphi Compiler -> Linking and set the option Debug information to true and the option Map file to Detailed. This is required to generate a MAP symbol file which will allow WonderLeak resolve stack traces into their symbol names.

While MAP files contain detailed symbol name information, they do not contain source file or line information for a symbol. If a MAP file is used, WonderLeak will not be able to display this information.

Copyright © 2021, Relyze Software Limited